package yt.kpool.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.king.base.adapter.ViewHolderAdapter;
import com.king.base.adapter.holder.ViewHolder;

import java.util.List;

import yt.kpool.R;
import yt.kpool.bean.PoolCoinBean;
import yt.kpool.network.NetHelperNew;
import yt.kpool.util.imageUtil.GlideUtil;

public class CalPopAdapter extends ViewHolderAdapter<PoolCoinBean.DataBean.CoinListBean> {

    private int selectedPos;//选中的id 没有为-1
    private int kind;
    public CalPopAdapter(Context context, List<PoolCoinBean.DataBean.CoinListBean> listData) {
        super(context, listData);
    }

    @Override
    public View buildConvertView(LayoutInflater layoutInflater, PoolCoinBean.DataBean.CoinListBean dataBean, int position) {
        return layoutInflater.inflate(R.layout.adapter_calpop,null);
    }

    @Override
    public void bindViewDatas(ViewHolder holder, PoolCoinBean.DataBean.CoinListBean s, int position) {

        TextView tv_name=holder.getView(R.id.tv_name);
        ImageView iv=holder.getView(R.id.iv_coin);
        GlideUtil.loadImage(context, NetHelperNew.URL + s.getIcon(), iv, R.mipmap.ic_launcher, R.mipmap.ic_launcher);
        tv_name.setText(s.getCode().toUpperCase());
    }


}
